package com.ymatou.iapi.productmanager.testcase;

import java.util.ArrayList;
import java.util.List;

import org.junit.After;
import org.junit.AfterClass;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;
import org.junit.experimental.categories.Category;

import com.ymatou.iapi.productmanager.parameter.BatchViolateSellerProductsBean;
import com.ymatou.iapi.productmanager.service.BatchViolateSellerProductsCall;
import com.ymt.core.tool.Logger;
import com.ymt.utils.annotation.TestCase;
import com.ymt.utils.annotation.TestSuite;
import com.ymt.utils.tag.P1;
import com.ymttest.utils.EnvSetup;
/**
*总线批量机审买手的PSP商品
*FreeMaker Template自动生成代码
*/
@TestSuite
public class Ts_BatchViolateSellerProducts{
	private static BatchViolateSellerProductsBean batchviolatesellerproductsBean;
	private static BatchViolateSellerProductsCall batchviolatesellerproductsCall;
	private static Integer sellerId1 = Integer.parseInt(EnvSetup.getData("productsellerid"));
	private static Integer sellerId2 = Integer.valueOf(EnvSetup.getData("productsellerid4"));
	private static Integer sellerId3 = Integer.valueOf(EnvSetup.getData("productpriceSellerId"));
	@BeforeClass
	public static void setUp() {
		Logger.createResultFile("总线批量机审买手的PSP商品");
	}

	@Before
	public void caseUp() {
		batchviolatesellerproductsBean=new BatchViolateSellerProductsBean();
		batchviolatesellerproductsCall=new BatchViolateSellerProductsCall();
	}

	@AfterClass
	public static void tearDown() {
		Logger.generateResult(batchviolatesellerproductsCall.getOpurl());
	}

	@After
	public void caseDown() {
		Logger.end();
	}
	@Test
	@Category({P1.class})
	@TestCase
	public void Tc_BatchViolateSellerProducts_001() {
		Logger.start(true,"总线批量机审买手的PSP商品");
		try {
			List<Integer> list = new ArrayList<Integer>();
			list.add(sellerId1);
			list.add(sellerId2);
			list.add(sellerId3);
			batchviolatesellerproductsBean.setSellerIdList(list);
			batchviolatesellerproductsCall.setData(batchviolatesellerproductsBean);
			batchviolatesellerproductsCall.callService();			
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
}